<?php 
    //session_start();
    //ob_start();
    require_once('../../../Connections/ocmanmanager.php');
    require_once('../../../Connections/checkuser.php'); ?>

<?php
    
    if(isset($_POST['save'])){   
    mysql_select_db($database_ocmanmanager, $ocmanmanager);
    $id = $_POST['id'];
    $notes = $_POST['notes']; 
    $notetitle= $_POST['notestitle'];
    $issueid = $_POST['issueid'];
    $dateadded = $_POST['dateadded'];
    $addedby = $_POST['addedby'];
    $important = $_POST['important'];
    $deleted = $_POST['deleted'];
    
    $query_add_notes = "INSERT INTO issuenotes(notetitle,notes,issueid,dateadded,addedby,important,deleted) VALUE ('$notetitle','$notes','$issueid','$dateadded','$addedby','$important','$deleted')";
    $mysql_result = mysql_query($query_add_notes); 
        echo '<script>';
        echo 'alert("data has been added")';
        echo '</script>';
    }
?>
<table style="border: 1px solid black;">
    <tr>
        <td>Add Notes</a></td>
    </tr>
    <tr>
        <td>Date:</td>
        <td><input type="text" name="dateadded"  class="idate" size="4" value=""/></td>
    </tr>
    <tr>
        <td>Notes:</td>
        <td><textarea name="notes" ></textarea></td>
    </tr>
    <tr>
        <td>Next Action:</td>
        <td><input  type="text" name="iaction[]"  class="iaction"   size="4" /></td>
    </tr>
    <tr>    
        <td>Assigned to by:</td>
        <td><input  type="text" name="'issueid"  class="iassign"   size="4" /></td>
    </tr>
    <tr>
        <td>To be done by:</td>
        <td><input  type="text" name="addedby"  class="idoneby datepicker" size="4" /></td>
    </tr>
    <tr><td colspan="1">
    <a href="add_notes.php" id="save" data-role="button">Save</a>
   
    </td></tr>
</table>
